$(document).ready(function(){jQuery('.main-menu__link--level-2.main-menu__link--active img').each(function(){var $img=jQuery(this);var imgID=$img.attr('id');var imgClass=$img.attr('class');var imgURL=$img.attr('src');jQuery.get(imgURL,function(data){var $svg=jQuery(data).find('svg');if(typeof imgID!=='undefined'){$svg=$svg.attr('id',imgID);} if(typeof imgClass!=='undefined'){$svg=$svg.attr('class',imgClass+' replaced-svg');} $svg=$svg.removeAttr('xmlns:a');$img.replaceWith($svg);},'xml');});var freezeVp=function(e){e.preventDefault();};function stopBodyScrolling(bool){if(bool===true){document.body.addEventListener("touchmove",freezeVp,false);}else{document.body.removeEventListener("touchmove",freezeVp,false);}} var scrollTimeout;$(window).on('scroll',function(){if(!scrollTimeout){scrollTimeout=setTimeout(function(){var windowWidth=window.innerWidth;var toolbarHeight=$('.el-toolbar-menu').height();var scrollTop=$(this).scrollTop();if(scrollTop>=100+toolbarHeight+1){if(windowWidth>=960){$('.header').css({marginTop:(-1)-toolbarHeight+"px"});$('.el-menu').addClass('scroll');$('.header').addClass('scroll');}}else{$('.header').css({marginTop:""});$('.el-menu').removeClass('scroll');$('.header').removeClass('scroll');} scrollTimeout=null;},50);}});function resizeHeader(){$('.content.clearfix').css({marginBottom:$('.header').height()});} $(window).on('resize',resizeHeader);resizeHeader();var scrollY=0;$(document).on('touchstart',function(e){scrollY=e.originalEvent.touches.item(0).clientY;});$(document).on('touchmove',function(e){var scrollDelta=scrollY-e.originalEvent.touches.item(0).clientY;if($(e.target).closest('.hero-wrapper').length&&scrollDelta<0){e.preventDefault();}});document.addEventListener('touchmove',function(event){if(event.scale!==1){event.preventDefault();}},false);$(window).on("load",function(){if(window.location.href.indexOf("#")>-1){var val=decodeURIComponent(window.location.href);var valProperty=(val.substr(val.indexOf("#")+1));$('html,body').animate({scrollTop:$('[name="'+valProperty+'"]').offset().top-110},1000);}});$('img[usemap]').imageMap();});function isMobile(width){if(width==undefined){width=960;} if(window.innerWidth<=width){return true;}else{return false;}}